<!DOCTYPE html>
<html>
<head>
    <include file="Include:meta"/>
    <title>添加项目-目的地运营集团数据管理平台</title>
    <include file="Include:style"/>
    <link rel="stylesheet" href="__PUBLIC__/mobile/css/mobiscroll.min.css">
</head>
<body style="background: #f3f3f3;">
<div class="header">
    <a class="back_btn" href="javascript:history.back(-1);"></a>
    添加项目
</div>
<include file="Include:commu_menu"/>
<div class="content">
    <div class="communicate_add" style="padding-bottom:64px;">
        <form action="__APP__/Mobile/Crm/project_add" method="post">
            <div class="form_item">
                <div class="form_item_tit">
                    项目信息
                </div>
                <div class="form_item_box">
                    <ul class="choice_list">
                        <li class="tz_li select_li">
                            <select name="information_id" autocomplete="off" class="xiala"
                                    required>
                                <option value="">关联需求*</option>
                                <foreach name="res_information" item="vo">
                                    <option value="{$vo.information_id}"
                                    <if condition="$information_id eq $vo['information_id']">selected</if>
                                    >{$vo.customer_name}</option>
                                </foreach>
                            </select>
                        </li>
                        <li class="task_li">
                            <input class="text_input" name="name" type="text"
                                   value="" placeholder="项目名称*" required>
                        </li>
                        <li class="task_li">
                            <input class="text_input" name="short_name" type="text"
                                   value="" placeholder="项目简称*" required>
                        </li>
                        <li class="tz_li select_li">
                            <select name="leader" autocomplete="off" class="xiala"
                                    required>
                                <option value="{:$_SESSION['dms_uid']}">{:$_SESSION['dms_username']}
                                </option>
                                <foreach name="user_list" item="vo">
                                    <option value="{$vo.id}">{$vo.username}(负责人*)</option>
                                </foreach>
                            </select>
                        </li>
                        <li class="tz_li select_li">
                            <select name="nature" class="xiala" autocomplete="off"
                                    required>
                                <option value="">项目性质*</option>
                                <for start="1" end="5">
                                    <option value="{$i}">{:get_nature($i)}</option>
                                </for>
                            </select>
                        </li>
                        <li class="tz_li select_li">
                            <select name="type" class="xiala" autocomplete="off"
                                    required>
                                <option value="">项目类型*</option>
                                <for start="1" end="7">
                                    <option value="{$i}">{:get_project_type($i)}</option>
                                </for>
                            </select>
                        </li>
                        <li class="tz_li select_li">
                            <select name="stage" class="xiala" autocomplete="off"
                                    required>
                                <option value="">项目阶段*</option>
                                <for start="1" end="7">
                                    <option value="{$i}">{:get_project_stage($i)}</option>
                                </for>
                            </select>
                        </li>
                    </ul>
                </div>
                <div class="form_item_tit">
                    重要程度
                </div>
                <div class="form_item_box label_box">
                    <for start="1" end="5">
                        <label class="form_label w60b radio">
                            <input type="radio" name="importance" value="{$i}">{:get_project_importance($i)}
                        </label>
                    </for>
                </div>
                <div class="form_item_box">
                    <ul class="choice_list">
                        <li class="tz_li select_li">
                            <select name="size" autocomplete="off" class="xiala"
                                    required>
                                <option value="">项目规模*</option>
                                <for start="1" end="6">
                                    <option value="{$i}">{:get_project_size($i)}</option>
                                </for>
                            </select>
                        </li>
                        <li class="task_li">
                            <input class="text_input" name="website" type="text"
                                   value="" placeholder="项目网站">
                        </li>
                        <li class="task_li">
                            <input class="text_input" name="address" type="text"
                                   value="" placeholder="项目地址">
                        </li>
                        <li class="task_li">
                            <input class="text_input" name="company_name" type="text"
                                   value="" placeholder="公司名称">
                        </li>
                        <li class="tz_li select_li">
                            <select name="company_nature" class="xiala" autocomplete="off">
                                <option value="">公司性质</option>
                                <option value="民营">民营</option>
                                <option value="国企">国企</option>
                                <option value="合资">合资</option>
                            </select>
                        </li>
                        <li class="task_li">
                            <textarea name="intro" placeholder="项目简介*（包含项目区位，面积，资源，规模，接待量等信息）"></textarea>
                        </li>
                        <li class="task_li">
                            <textarea name="work_demands" placeholder="合作诉求*"></textarea>
                        </li>
                        <li class="task_li">
                            <textarea name="backdrop" placeholder="项目背景*"></textarea>
                        </li>
                        <li class="task_li">
                            <textarea name="prognosis" placeholder="项目预判*"></textarea>
                        </li>
                        <li class="task_li">
                            <textarea name="remark" placeholder="备注"></textarea>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="build_btn paddbox">
                <div>
                    <input id="submit" type="submit" value="提交" class="sub_btn">
                </div>
            </div>
        </form>
    </div>
</div>
<include file="Include:javascript"/>
<script src="__PUBLIC__/mobile/js/mobiscroll.min.js"></script>
<script>
    $(function () {
        //任务分类
        $('.xiala').mobiscroll().select({
            theme: 'ios',
            lang: 'zh',
            display: 'bottom'
        });
        $('#submit').click(function () {
            var information_id = $("select[name='information_id']").val()
            var project_num = $("input[name='project_num']").val()
            var name = $("input[name='name']").val()
            var short_name = $("input[name='short_name']").val()
            var nature = $("select[name='nature']").val()
            var type = $("select[name='type']").val()
            var stage = $("select[name='stage']").val()
            var size = $("select[name='size']").val()
            var intro = $("textarea[name='intro']").val()
            var work_demands = $("textarea[name='work_demands']").val()
            var backdrop = $("textarea[name='backdrop']").val()
            var prognosis = $("textarea[name='prognosis']").val()
            if (information_id.length > 0 && project_num.length > 0 && name.length > 0 && short_name.length > 0 && nature.length > 0 && type.length > 0 && stage.length > 0 && size.length > 0 && intro.length > 0 && work_demands.length > 0 && work_demands.length > 0 && backdrop.length > 0 && prognosis.length > 0) {
                $('#submit').css({'background': '#8E8E8E'})
                $(this).val("提交中...");
            } else {
                defeated_alert('带*为必填项');
            }
        })
    })
</script>
</body>
</html>